# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=crunch
pkgver=3.6
pkgrel=2
groups=('blackarch' 'blackarch-automation')
pkgdesc='A wordlist generator for all combinations/permutations of a given character set.'
arch=('x86_64' 'aarch64')
url='http://sourceforge.net/projects/crunch-wordlist/'
license=('GPL')
depends=('glibc')
source=("http://downloads.sourceforge.net/$pkgname-wordlist/$pkgname-$pkgver.tgz")
sha512sums=('85a2a12bb481988ab27a19602122abc29bb307de0af279132dcc0565dfc4ba44ab9f7ca15d876001f2e6dcf7be77ed50168cb066fc6a65bf06ec5cf9d798e81f')

build() {
  cd "$pkgname-$pkgver"

  make
}

package() {
  cd "$pkgname-$pkgver"

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 charset.lst "$pkgdir/usr/share/$pkgname/charset.lst"
  install -Dm 644 "$pkgname.1" "$pkgdir/usr/share/man/man1/$pkgname.1"
  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

